from django.db import models
from user.models import User

# Create your models here.
from department.models import Department
from user.models import User


class WorkReport(models.Model):
    report = models.TextField('工作报告')
    title = models.CharField('标题',max_length=50,default="")
    created_time = models.TimeField('创建时间',auto_now_add=True)
    updated_time = models.TimeField('修改时间',auto_now=True)
    #关联用户
    user = models.ForeignKey(User,on_delete=models.CASCADE,default=None)
    department = models.ForeignKey(Department, on_delete=models.CASCADE, default=None)
    #关联部门

class ReportDraft(models.Model):
    report = models.TextField('工作报告')
    title = models.CharField('标题', max_length=50, default="")
    created_time = models.TimeField('创建时间',auto_now_add=True)
    updated_time = models.TimeField('修改时间',auto_now=True)
    user = models.ForeignKey(User,on_delete=models.CASCADE,default=None)


